package xyz.showbooks.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import xyz.dfm.util.UtilPagePojo;
import xyz.dfm.pojo.Permission;
import xyz.dfm.pojo.Role;

import java.util.List;

/**
 * @author: Dsi
 * @date: 2022/2/24 11:02
 * @description:
 */
public interface PermissionMapper extends BaseMapper<Permission> {
    //根据用户id查角色
    List<Role> findRoleById(UtilPagePojo utilPagePojo);
    //根据角色Id查权限
    List<Permission> findPermissionByRole(Integer roleId);
    //根据用户Id查权限
    List<Permission> selectUserPermission(Integer userId);

    List<String> findPermissionById(Integer roleId);
}

